package com.black.web.controller.my.orders;

import com.black.app.domain.req.my.myorders.SysOrderAfterSaleQueryReq;
import com.black.app.domain.resp.my.myorders.SysAfterSaleResp;
import com.black.app.service.my.AppMyOrderAftersaleService;
import com.black.common.core.controller.BaseController;
import com.black.common.core.domain.R;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;


@Api(tags = "后台-订单售后相关Api")
@RestController
@RequestMapping("/admin/my/aftersale")
public class SysAftersaleController extends BaseController {

    @Autowired
    private AppMyOrderAftersaleService orderAftersaleService;

    /**
     * 分页查询售后订单
     * @param req
     * @return
     */
    @PreAuthorize("@ss.hasPermi('my:aftersale:list')")
    @ApiOperation(value = "分页查询售后订单")
    @GetMapping(value = "/list")
    public R<PageInfo<SysAfterSaleResp>> list (SysOrderAfterSaleQueryReq req) {
        PageInfo<SysAfterSaleResp> pageInfo = this.orderAftersaleService.paginationQuery(req);
        return R.ok(pageInfo);
    }

}
